#pragma once
#include "CLComString.h"
#include "CLComValue.h"
#include "CLComLibrarys_global.h"
//CLCOMLIBRARYS_EXPORT

class CLCOMLIBRARYS_EXPORT CListItem
{
public:
    CListItem(CLComString key, const CLComValue& invalue,
		int nIndex);

	~CListItem();

public:
	void SetPreItem(CListItem* ppre);
	void SetNextItem(CListItem* pNext);

public:
	CListItem* GetPreItem();
	CListItem* GetNextItem();

public:
	void SetIndex(int nIndex);
	int GetIndex();

public:
	int	GetIntValue();
	double GetDoubleValue();
    CLComString GetStringValue();
	void* GetPointerValue();
	int GetPointerValueLen();

    CLComString GetKey();

    CLComValue* GetValue();
private:
    void Init(CLComString key, int nIndex);
	
private:
    CLComValue	m_value;

    CLComString	m_key;
    int         m_nIndex;

	CListItem*	m_pPreItem;
	CListItem*	m_pNextItem;
};
